import dva from 'dva';
import { createBrowserHistory } from 'history';
import a2dmah5 from 'a2dmah5';
import models from './models/index';
//import pageConfig from './models/pageConfig';
import './index.scss';

// 1. Initialize
const app = dva({ history: createBrowserHistory() });

// 2. Plugins
// app.use({});

// 3. Model
models.forEach(m => app.model(m));
a2dmah5.getModels().forEach(m => app.model(m));

// 4. Router
app.router(require('./router').default);

// 5. Start
app.start('#root');